'''
2022.2.25
生成营业厅报表使用

'''
import json
import logging
from django.db import connection
from django.http import JsonResponse
from wxcloudrun.models import report as obj
from wxcloudrun import util
from openpyxl import load_workbook

def getresult(request, _):
    print("获取营业厅统计报表")
    results = obj.objects.all()
    print(results)
    print(util.convert_to_dicts(results))
    rsp = JsonResponse({'code': 0, 'errorMsg': '', 'data': util.convert_to_dicts(results)}, json_dumps_params={'ensure_ascii': False})
    return rsp

#导出数据到EXCEL中 测试

